package com.yvan.leto.server.service;

import com.google.common.collect.Lists;
import com.yvan.leto.server.dao.EnvMapper;
import com.yvan.leto.server.domain.Env;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EnvService {

    @Autowired
    private EnvMapper envMapper;

    public List<Env> envFindAllWithEmpty() {
        List<Env> list = Lists.newArrayList();
        list.add(new Env("", "Common"));
        list.addAll(envMapper.selectAll());
        return list;
    }

    public List<Env> selectAll() {
        return envMapper.selectAll();
    }
}
